1262ed5cafdec37973c83e0559a4d5905861b693,xwiki-platform-core/xwiki-platform-wysiwyg/xwiki-platform-wysiwyg-client/src/main/java/org/xwiki/gwt/wysiwyg/client/plugin/link/LinkMetaDataExtractor.java,LinkMetaDataExtractor,processElement,#Element#,62
Before Change
foundWikiLink &=
previousSibling != null && previousSibling.getNodeType() == DOMUtils.COMMENT_NODE
&& previousSibling.getNodeValue().startsWith("startwikilink");
nextSibling = parentNode.getNextSibling();
foundWikiLink &=
nextSibling != null && nextSibling.getNodeType() == DOMUtils.COMMENT_NODE
&& nextSibling.getNodeValue().startsWith("stopwikilink");
After Change
DocumentFragment metaFragment = ((Document) anchor.getOwnerDocument()).createDocumentFragment();
// Move the link markers.
metaFragment.appendChild(parentNode.getPreviousSibling());
metaFragment.appendChild(parentNode.getNextSibling());
// Create the place-holder and replace the anchor.
Text placeholder = (Text) ((Document) anchor.getOwnerDocument()).createTextNode(Element.INNER_HTML_PLACEHOLDER);
parentNode.replaceChild(placeholder, anchor);